package hcn.protocol.ods.casehistory;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

/**
 * @program: 20190427StandardEdition
 *
 * @description: 快递单号生成方式枚举
 *
 * @author: zhusm@bsoft.com.cn
 *
 * @create: 2019-06-21 10:52
 **/
@NoArgsConstructor
@AllArgsConstructor
public enum TrackNoGenerationMode {
    //1、手动录入2、系统生成3、系统生成2
    MANUALENTRY(1,"手动录入"),
    SYSTEMGENERATIONONE(2,"系统生成1"),
    SYSTEMGENERATIONTWO(3,"系统生成2");

    private int code;
    private String description;

    public static final TrackNoGenerationMode getDescription(int code){
        for (TrackNoGenerationMode type : TrackNoGenerationMode.values()){
            if (type.getCode() == code){
                return type;
            }
        }
        return null;
    }

    public int getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }
}
